﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;
using Barbar.MapReport.Common;
using System.Drawing;
using System.Globalization;
using System.Xml.Serialization;

namespace Barbar.MapReport.Common.Drawing.Commands {
  [XmlType(Namespace = Constants.XmlNamespace)]
  [Serializable]
  public class AddRegionsWithBusinessProcessingCommand : AddRegionsCommand, IDataLocationProvider {
    private Collection<BusinessRegionList> m_Regions = new Collection<BusinessRegionList>();
    private LegendDescription m_LegendDescription;
    private DataLocation m_DataLocation = new DataLocationInline();
    private SerializedColor m_StrokeColor = new SerializedColor(System.Drawing.Color.Red);
    private int m_StrokeWeight = 1;

    public LegendDescription LegendDescription {
      get { return m_LegendDescription; }
      set { m_LegendDescription = value; }
    }

    public SerializedColor StrokeColor {
      get { return m_StrokeColor; }
      set { m_StrokeColor = value; }
    }

    public int StrokeWeight {
      get { return m_StrokeWeight; }
      set { m_StrokeWeight = value; }
    }

    public Collection<BusinessRegionList> Regions {
      get { return m_Regions; }
    }

    public override void Render(IRenderer renderer) {
      renderer.AddRegionsWithBusinessProcessing(this);
    }

    #region IDataLocationProvider Members

    public DataLocation DataLocation {
      get { return m_DataLocation; }
      set { m_DataLocation = value; }
    }

    #endregion
  }
}
